import common from '/@/common/common'
import netTest from '/@/server/netTest'

interface BaseType{
    telnet(host: string, port?: number): Promise<string>
}
class Select implements BaseType{
    async telnet(host: string, port?: number): Promise<string> {
        // @ts-ignore
        if(common.objectAvailable(window.client)) {
            // @ts-ignore
            return await netTest.telnet(host, port)
        } else {
            return '前端环境暂不支持测试'
        }

    }
}

const select = new Select()

export default select;